<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<jsp:useBean id="dao" class="ligapes.model.dao.TorneioDAO" />
<table border="1">
	<thead>
		<tr>
			<th>Nome</th>
			<th>Data Inicial</th>
			<th>Data Final</th>
			<th>Jogos</th>
			<th>Equipes</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${dao.listar()}" var="torneio" varStatus="id">
			<tr bgcolor="#${id.count % 2 != 0 ? 'E6E6FA' : 'F5F5F5'}">
				<td>${torneio.nome}</td>
				<td><fmt:formatDate value="${torneio.dataInicial}" pattern="dd/MM/yyyy"/></td>
				<td><fmt:formatDate value="${torneio.dataFinal}" pattern="dd/MM/yyyy"/></td>
				<td>${torneio.jogos}</td>
				<td>${torneio.equipes}</td>
			</tr>
		</c:forEach>
	</tbody>
</table>